package com.designpattern.creatorpattern.factorypattern.simple;

/**
 * @author Administration
 * @date 2021/10/13 - 10:56 - 星期三
 * @project lambda
 * @package com.designpattern.factorypattern.simple
 * @by 晨
 */
public class CoffeeStore {
    public Coffee orderCoffee(String type) {
        SimpleCoffeeFactory factory = new SimpleCoffeeFactory();
        //调用生产咖啡的方法
        Coffee coffee = factory.createCoffee(type);

        //加配料
        coffee.addMilk();
        coffee.addsugar();

        return coffee;
    }
}
